package com.ruoyi.hospital.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hospital.mapper.DepartmentDiseaseMapper;
import com.ruoyi.hospital.domain.DepartmentDisease;
import com.ruoyi.hospital.service.IDepartmentDiseaseService;

/**
 * 科室疾病关联Service业务层处理
 * 
 * @author 天天困
 * @date 2025-08-14
 */
@Service
public class DepartmentDiseaseServiceImpl implements IDepartmentDiseaseService 
{
    @Autowired
    private DepartmentDiseaseMapper departmentDiseaseMapper;

    /**
     * 查询科室疾病关联
     * 
     * @param id 科室疾病关联主键
     * @return 科室疾病关联
     */
    @Override
    public DepartmentDisease selectDepartmentDiseaseById(Long id)
    {
        return departmentDiseaseMapper.selectDepartmentDiseaseById(id);
    }

    /**
     * 查询科室疾病关联列表
     * 
     * @param departmentDisease 科室疾病关联
     * @return 科室疾病关联
     */
    @Override
    public List<DepartmentDisease> selectDepartmentDiseaseList(DepartmentDisease departmentDisease)
    {
        return departmentDiseaseMapper.selectDepartmentDiseaseList(departmentDisease);
    }

    /**
     * 新增科室疾病关联
     * 
     * @param departmentDisease 科室疾病关联
     * @return 结果
     */
    @Override
    public int insertDepartmentDisease(DepartmentDisease departmentDisease)
    {
        return departmentDiseaseMapper.insertDepartmentDisease(departmentDisease);
    }

    /**
     * 修改科室疾病关联
     * 
     * @param departmentDisease 科室疾病关联
     * @return 结果
     */
    @Override
    public int updateDepartmentDisease(DepartmentDisease departmentDisease)
    {
        return departmentDiseaseMapper.updateDepartmentDisease(departmentDisease);
    }

    /**
     * 批量删除科室疾病关联
     * 
     * @param ids 需要删除的科室疾病关联主键
     * @return 结果
     */
    @Override
    public int deleteDepartmentDiseaseByIds(Long[] ids)
    {
        return departmentDiseaseMapper.deleteDepartmentDiseaseByIds(ids);
    }

    /**
     * 删除科室疾病关联信息
     * 
     * @param id 科室疾病关联主键
     * @return 结果
     */
    @Override
    public int deleteDepartmentDiseaseById(Long id)
    {
        return departmentDiseaseMapper.deleteDepartmentDiseaseById(id);
    }
}
